package com.atguigu.jxc.controller;

import com.atguigu.jxc.service.UnitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * ClassName: UnitController
 * Description:
 * Date: 2022/1/16 0:25
 *
 * @version:
 * @since JDK 1.8
 */
@RestController
@RequestMapping("/unit")
public class UnitController {


    @Autowired
    private UnitService unitService;

    @PostMapping("/list")
    public Map<String,Object> findUnit(){
        Map<String,Object> unitMap = unitService.findUnit();
        return unitMap;

    }
}
